﻿<UserControl x:Class="AzukiMapUI.PostGISTableProperties"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="600" Height="480">
    <Grid x:Name="LayoutRoot" Background="#FFFFFFFF">
        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!-- labels -->
        <TextBlock Margin="8,0,0,0" Text="Server Path" TextWrapping="Wrap" VerticalAlignment="Center"/>
        <TextBlock Margin="8,0,8,0" Text="DB Name" TextWrapping="Wrap" Grid.Row="1" VerticalAlignment="Center"/>

        <!-- inputs -->
        <TextBox x:Name="TbServerPath" LostFocus="TbServerPath_LostFocus" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Grid.Column="1" VerticalAlignment="Center" Width="256" HorizontalAlignment="Left"/>
        <TextBlock Margin="0,5,4,3" Text="/getGeometryColumns.php" TextWrapping="NoWrap" HorizontalAlignment="right" Width="160" Grid.Column="1" TextAlignment="Left"/>
        <TextBox x:Name="TbDbName" LostFocus="TbDbName_LostFocus" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Width="256" HorizontalAlignment="Left"/>
        <Button x:Name="BtnConnect" Click="BtnConnect_Click" HorizontalAlignment="Right" Margin="0,0,4,0" Width="84" Height="24" Content="Connect" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" IsEnabled="False"/>
        
        <!-- errors-->
        <Image Height="16" x:Name="IconErrorServerPath" HorizontalAlignment="Right" Margin="0,0,4,0" Visibility="Visible" VerticalAlignment="Center" Width="16" Source="../icons/error.png" Stretch="Fill" Grid.Row="0"/>
        <Image Height="16" x:Name="IconErrorDbName" HorizontalAlignment="Right" Margin="0,0,4,0" Visibility="Visible" VerticalAlignment="Center" Width="16" Source="../icons/error.png" Stretch="Fill" Grid.Row="1"/>
        <Image Height="16" x:Name="IconErrorConnection" HorizontalAlignment="Right" Margin="0,8,4,0" Visibility="Collapsed" VerticalAlignment="Top" Width="16" Source="../icons/error.png" Stretch="Fill" Grid.Row="4"/>
        <TextBlock Margin="8,8,0,0" x:Name="TbErrorMessage" Text="The connection failed." TextWrapping="Wrap" VerticalAlignment="Top" Grid.Row="4" Grid.Column="2" HorizontalAlignment="Left" Visibility="Collapsed"/>

        <!-- table selection -->
        <Grid x:Name="GrGeomSelection" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Visibility="Collapsed">
            <Grid.RowDefinitions>
                <RowDefinition Height="4"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
                <RowDefinition Height="26"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <!-- lables -->
            <TextBlock Margin="8,0,8,0" Text="Table / Geometry Column" TextWrapping="Wrap" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Center"/>
            <!--
            <TextBlock Margin="8,0,8,0" Text="Geometry Column" TextWrapping="Wrap" Grid.Row="2" VerticalAlignment="Center"/>
            -->
            <TextBlock Margin="8,0,8,0" Text="Table Schema" TextWrapping="Wrap" Grid.Row="3" VerticalAlignment="Center"/>
            <TextBlock Margin="8,0,8,0" Text="Table Catalog" TextWrapping="Wrap" Grid.Row="4" VerticalAlignment="Center"/>
            <TextBlock Margin="8,0,8,0" Text="SRID" TextWrapping="Wrap" Grid.Row="5" VerticalAlignment="Center"/>
            <TextBlock Margin="8,0,8,0" Text="Geometry Type" TextWrapping="Wrap" Grid.Row="6" VerticalAlignment="Center"/>
            <!--
		    <TextBlock Margin="8,0,8,0" Text="Max Scale" TextWrapping="Wrap" Grid.Row="7" VerticalAlignment="Center"/>
		    <TextBlock Margin="8,0,8,0" Text="Min Scale" TextWrapping="Wrap" Grid.Row="8" VerticalAlignment="Center"/>
		    -->

            <!-- inputs -->
            <ComboBox x:Name="CbGeomColumn" SelectionChanged="CbGeomColumn_SelectionChanged" Margin="8,0,8,0" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Center"/>
            <!--
            <ComboBox x:Name="CbGeomColumn" Margin="8,0,8,0" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"/>
            -->
            <TextBlock x:Name="TbkSchema" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Grid.Column="1" Grid.Row="3" Height="24" VerticalAlignment="Center"/>
            <TextBlock x:Name="TbkCatalog" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Width="146" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center"/>
            <TextBlock x:Name="TbkSrid" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Width="146" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" VerticalAlignment="Center"/>
            <TextBlock x:Name="TbkGeomType" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Width="146" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="6" VerticalAlignment="Center"/>
            <!--
		    <TextBox x:Name="TbMaxScale" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" Width="256" HorizontalAlignment="Left"/>
		    <TextBox x:Name="TbMinScale" Margin="8,0,8,0" Text="" TextWrapping="Wrap" Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" Width="256" HorizontalAlignment="Left"/>
		    -->


        </Grid>

    </Grid>
</UserControl>
